import request from '@/utils/request'

// 库存盘点 上列表
export function getListAPI(params) {
  return request({
    url: '/storage/checkManagement/list',
    method: 'GET',
    params
  })
}

// 库存盘点 下列表-单据明细
export function getDetailListAPI(params) {
  return request({
    url: '/storage/checkManagement/detailList',
    method: 'GET',
    params
  })
}

// 库存盘点 下列表-物料明细
export function getMaterialListAPI(params) {
  return request({
    url: '/storage/checkManagement/materialList',
    method: 'GET',
    params
  })
}

// 库存盘点 新增中的 物料汇总
export function sumStockAPI(params) {
  return request({
    url: '/storage/checkManagement/groupMaterial',
    method: 'GET',
    params
  })
}

// 库存盘点 新增中的 物料明细
export function wmsStockAPI(params) {
  return request({
    url: '/storage/checkManagement/takingMaterialDetail',
    method: 'GET',
    params
  })
}

// 库存盘点 新增中的 盘点中物料
export function allotListAPI(params) {
  return request({
    url: '/storage/checkManagement/takingStock',
    method: 'GET',
    params
  })
}

// 盘点专属仓库下拉
export function typeWarehouseAPI(params) {
  return request({
    url: '/storage/warehouse/typeWarehouse',
    method: 'GET',
    params
  })
}

// 盘点+号弹窗列表
export function groupMaterialAPI(params) {
  return request({
    url: '/storage/checkManagement/groupMaterial',
    method: 'GET',
    params
  })
}

// 库存盘点新增
export function addCheckAPI(data) {
  return request({
    url: '/storage/checkManagement/add',
    method: 'POST',
    data
  })
}

// 库存盘点 删除
export function deleteAPI(data) {
  return request({
    url: '/storage/checkManagement/delete/' + data,
    method: 'GET'
  })
}

// 库存盘点 查看
export function checkManagAPI(data) {
  return request({
    url: '/storage/checkManagement/view/' + data,
    method: 'GET'
  })
}

// 库存盘点 修改
export function updateAPI(data) {
  return request({
    url: '/storage/checkManagement/updateCheck',
    method: 'POST',
    data
  })
}

// 库存盘点关结
export function CloseAPI(data) {
  return request({
    url: '/storage/checkManagement/close',
    method: 'POST',
    data
  })
}

// 审核Ok
export function OKAPI(data) {
  return request({
    url: '/storage/checkManagement/reviceOk',
    method: 'PUT',
    data
  })
}

// 审核NG
export function NGAPI(data) {
  return request({
    url: '/storage/checkManagement/reviceNg',
    method: 'PUT',
    data
  })
}

// 单据审核确定
export function YESAPI(data) {
  return request({
    url: '/storage/checkManagement/checkReview',
    method: 'PUT',
    data
  })
}

// 盘点PDA

// pda盘点
export function PdCheckAPI(data) {
  return request({
    url: '/storage/checkManagement/pdCheck',
    method: 'POST',
    data
  })
}

// (等待接口)
// 库存盘点物料下拉列表
export function GetSelListAPI(params) {
  return request({
    url: '/storage/checkManagement/getMaterial',
    method: 'GET',
    params
  })
}

// Pda-盘点完成
export function OpenWindowAPI(data) {
  return request({
    url: '/storage/checkManagement/openWindow',
    method: 'POST',
    data
  })
}

// Pda-明细盘点弹窗提醒
export function CheckInventoryAPI(data) {
  return request({
    url: '/storage/checkManagement/checkInventory',
    method: 'POST',
    data
  })
}

// 线边仓
export function GetWarehouseAPI(params) {
  return request({
    url: '/storage/warehouse/list',
    method: 'GET',
    params
  })
}

//第一步盘点扫码获取数量
export function getMaterialNumberAPI(params) {
  return request({
    url: '/storage/checkManagement/getMaterialNumber',
    method: 'GET',
    params
  })
}
